package com.cosina.game.robodefence.model;

import com.cosina.game.robodefence.data.RewardData;

public class Reward {
	public final int id;
	private int level;
	public Reward(int id,int level){
		this.id = id;
		this.level = level;
	}
	
	public String getName(){
		return RewardData.data[id][0].toString();
	}
	public String getDesc(){
		return RewardData.data[id][1].toString();
	}
	public int getMaxLevel(){
		return (Integer)RewardData.data[id][2];
	}
	public int getNeedPoints(){
		return (Integer)RewardData.data[id][3];
	}
	
	public boolean hasLevel(){
		return getMaxLevel() > 1;
	}
	public int getLevel(){
		return level;
	}
	public boolean canUpgrade(){
		return getLevel() < getMaxLevel();
	}

	public String getInfo() {
		if(hasLevel()){
			return "[Lvl:" + level + " Points:" + getNeedPoints()+ "]";
		}
		return "[Points:" + getNeedPoints()+ "]";
	}
}
